package model

import "time"

type Administrators struct {
	Id           uint64    `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	UserId       int64     `gorm:"column:user_id;type:bigint(20);comment:用户id;not null;" json:"user_id"`              // 用户id
	PermissionId int64     `gorm:"column:permission_id;type:bigint(20);comment:权限id;not null;" json:"permission_id"`  // 权限id
	State        int32     `gorm:"column:state;type:int(10);comment:状态 0正常 1停用;not null;default:0;" json:"state"` // 状态 0正常 1停用
	CreateTime   time.Time `gorm:"column:create_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"create_time"`
	UpdateTime   time.Time `gorm:"column:update_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_time"`
}

func (a Administrators) TableName() string {
	return "administrators"
}
